package com.eati.cm.ctrler;

import com.eati.cm.model.StoryGenre;
import com.eati.cm.serv.IStoryGenreServ;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("StoryGenre")
public class StoryGenreCtrler {
    @Autowired
    private IStoryGenreServ storyGenreServ;

    @ResponseBody
    @GetMapping("findAllStoryGenre")
    public List<StoryGenre> findAllStoryGenre(){
        return storyGenreServ.findAll();
    }

}
